home *** CD-ROM | disk | FTP | other *** search
File List | 1989-07-02 | 6.0 KB | 291 lines |
- '
- ' *********************************************************************
- ' S H O W I T !
- ' A Slide Show Program
- ' for Young Children
- ' yet another kidprg in GFA Basic from
- ' D.A. Brumleve
- ' Copyright 1989 by ST-LOG
- ' **********************************************************************
- ' Monochrome
- ' Version 1.6
- ' February 16, 1989
- ' **********************************************************************
- ' REFERENCE
- ' **********************************************************************
- ' VARIABLES
- ' Aa%
- ' Alrt$
- ' Ax%
- ' Ay%
- ' Bb%
- ' Button%
- ' Cc%
- ' Dummy%
- ' Dur%
- ' First_time%
- ' G%
- ' I%
- ' K%
- ' Main_screen$
- ' Mk%
- ' Mx%
- ' My%
- ' N%
- ' Nt%
- ' Oct%
- ' Palette%()
- ' Pic$()
- ' Rez%
- ' Sg%
- ' Ss%
- ' Stx%
- ' Sty%
- ' Yes%
- ' Z$
- '
- ' **************************** INITIALIZATION ************************
- Dim Palette%(1),Pic$(6)
- @Check_rez
- @Save_palette
- If Not Exist("MDRAWIT!.DAT")
- Alrt$=" |There are no DRAW IT! pictures|on this disk!"
- Alert 3,Alrt$,1,"Oops...",Dummy%
- Cls
- @Restore_palette
- End
- Endif
- @Set_color
- Hidem
- Graphmode 2
- Cls
- For I%=1 To 5
- Get 0,112,638,398,Pic$(I%)
- Next I%
- Cls
- @Title
- K%=Xbios(35,15,0)
- I%=1
- First_time%=0
- Repeat
- Until Inkey$=""
- ' ***************************** MAIN PROGRAM ***************************
- Top:
- Repeat
- Mouse Ax%,Ay%,Button%
- Z$=Inkey$
- If Z$<>""
- First_time%=1
- Put 0,112,Pic$(I%)
- @Select_sound
- Repeat
- Until Inkey$=""
- Inc I%
- If I%>5
- I%=1
- Endif
- Endif
- Until Button%>0
- Sget Main_screen$
- @Let_go
- @Exit_routine
- Hidem
- If Yes%=0
- Sput Main_screen$
- Goto Top
- Else
- Sput Main_screen$
- @Finale_sound
- Cls
- @Restore_palette
- K%=Xbios(35,7,7)
- End
- Endif
- '
- ' *************************** DISK ACTIVITIES **************************
- Procedure Load_it
- Open "I",#1,"MDRAWIT!.DAT"
- For I%=1 To 5
- Bget #1,Varptr(Pic$(I%)),Len(Pic$(I%))
- Next I%
- Close #1
- Return
- '
- ' ********************************* SCREENS *******************************
- Procedure Title
- G%=125
- Sg%=75
- Deftext 1,1,0,32
- Text 198,40,"S H O W I T !"
- Deftext 1,1,0,13
- Text 70+G%,70," A Slide Show Program"
- Text 70+G%,90," for Young Children"
- Deffill 0
- Pbox 0,112,638,398
- Ss%=50
- Deftext 1,1,0,6
- Text 90+Sg%,70+Ss%,"YET ANOTHER KIDPRG IN GFA BASIC FROM"
- Deftext 1,0,0,6
- Text 310,70+Ss%,Chr$(191)
- Deftext 1,0,0,13
- Text 70+G%,90+Ss%," D.A. Brumleve"
- Deftext 1,5,0,6
- Text 120+Sg%,108+Ss%," ST-LOG"
- Deftext 1,1,0,6
- Text 120+Sg%,108+Ss%," COPYRIGHT 1989 BY"
- Deftext 1,1,0,6
- Text 102+Sg%,126+Ss%," MONOCHROME VERSION 1.6"
- Ss%=40
- Deftext 1,1,0,13
- Text 52+G%,170+Ss%," For use with files created with"
- Text 66+G%,200+Ss%," DRAW IT!"
- Text 45+G%,230+Ss%,"As published originally in !"
- Sty%=92+Ss%
- Stx%=-12
- Color 1
- Box 408+Stx%,104+Sty%,448+Stx%,146+Sty%
- Color 0
- Box 410+Stx%,106+Sty%,446+Stx%,144+Sty%
- Deffill 0,2,8
- Pbox 410+Stx%,132+Sty%,446+Stx%,144+Sty%
- Deffill 1,2,8
- Pbox 412+Stx%,108+Sty%,444+Stx%,130+Sty%
- Deftext 0,1,0,32
- Text 414+Stx%,130+Sty%," T"
- Text 410+Stx%,130+Sty%,"S"
- Deftext 1,1,0,6
- Text 421+Stx%,142+Sty%," G"
- Text 416+Stx%,142+Sty%," O"
- Text 411+Stx%,142+Sty%,"L"
- @Load_it
- Deffill 1
- Pbox 20,300,618,398
- Deffill 0
- Pbox 24,304,614,394
- Deffill 1
- Pbox 28,308,610,390
- Deftext 0,1,0,13
- Text 69+G%,334,"Press any key to show a picture."
- Text 61+G%,374," Press a mouse button to quit."
- Return
- '
- ' *************************** WATCH THE MOUSE *************************
- Procedure Let_go
- Repeat
- Mouse Mx%,My%,Mk%
- Until Mk%=0
- Return
- '
- Procedure Check_target
- Repeat
- Mouse Aa%,Bb%,Cc%
- Until Cc%>0 And Bb%>240 And Bb%<340 And ((Aa%>398 And Aa%<538) Or (Aa%>100 And Aa%<240))
- Deffill 0,2,8
- If Aa%>398 And Aa%<538
- Yes%=0
- Fill 396,238
- Else
- Yes%=1
- Fill 98,238
- Endif
- @Alert_sound
- @Let_go
- Pause 25
- Return
- '
- ' **************************** COLOR PALETTE **************************
- Procedure Check_rez
- Rez%=Xbios(4)
- If Rez%<>2
- Alrt$=" |This version of SHOW IT!|requires High Resolution."
- Alert 3,Alrt$,1,"Oops!",Dummy%
- End
- Endif
- Return
- '
- Procedure Save_palette
- For I%=0 To 1
- Palette%(I%)=Xbios(7,W:I%,W:-1)
- Next I%
- Return
- '
- Procedure Restore_palette
- For I%=0 To 1
- Setcolor I%,Palette%(I%)
- Next I%
- Return
- '
- Procedure Set_color
- Setcolor 0,0
- Setcolor 1,1
- Return
- '
- ' ******************************** DIALOGS *******************************
- Procedure Exit_routine
- @Save_alert
- Deftext 0,0,0,32
- Text 106,200,"Do you really want to quit?"
- Showm
- @Check_target
- Return
- '
- Procedure Save_alert
- If First_time%=0
- Deffill 1,2,8
- Pbox 0,112,638,398
- Deffill 0
- Pbox 4,116,634,394
- Endif
- Deffill 1,2,8
- Pbox 10,120,628,390
- Deffill 0,2,8
- Pbox 102,242,238,338
- Pbox 400,242,536,338
- Color 0
- Box 96,236,244,344
- Box 394,236,542,344
- Deffill 1,2,8
- Pbox 104,244,236,336
- Deffill 1,2,8
- Pbox 402,244,534,336
- Deftext 0,0,0,32
- Text 140,300,"Yes!"
- Text 450,300,"No."
- Return
- '
- ' ******************************* SOUNDS *********************************
- Procedure Select_sound
- Sound 1,15,6,3,2
- Sound 1,15,6,4,2
- Sound 1,15,8,4,6
- Sound 1,0,0,0,0
- Return
- '
- Procedure Alert_sound
- Sound 1,15,10,3,2
- Sound 1,0,0,0,0
- Return
- '
- Procedure Finale_sound
- Restore Finale_data
- Read N%
- For I%=1 To N%
- Read Nt%,Oct%,Dur%
- Sound 1,15,Nt%,Oct%,Dur%
- Sound 1,0,0,0,0
- Pause 5
- Next I%
- Return
- '
- ' ********************************* DATA *******************************
- Finale_data:
- Data 7
- Data 6,4,16
- Data 1,4,8
- Data 1,4,8
- Data 3,4,16
- Data 1,4,32
- Data 5,4,16
- Data 6,4,64
- '
-